﻿@model Forest.Cat.Admin.Models.Resumes.WorkExperienceModel
@using Forest.Cat.Domain.Entities
@{
    ViewBag.Title = "工作经验";
    Layout = "~/Administration/Views/Shared/_JobseekerRoot.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $('#jobCategoryList1').val($('#Category1').val());
        $('#btnSubmit').bind('click', function () {
            $('#Category1').val($('#jobCategoryList1').val());
        });
    });
</script>
@using (Html.BeginForm("WorkEdit", "Resume", FormMethod.Post))
{
    <div class="Work_experience">
        <div class="Work_experience_title">
            @ViewBag.Title</div>
        <div class="Work_experience_box">
            <ul>
                <li>
                    <p>
                        公司名称</p>
                    @Html.TextBoxFor(x => x.CompanyName, new { @class = "long_input" })
                    @Html.CheckBoxFor(x => x.IsOverseas)海外公司
                    <p>
                    </p>
                    @Html.ValidationMessageFor(x => x.CompanyName)</li>
                <li>
                    <p>
                        公司性质</p>
                    @Html.DropDownListFor(
                            x => x.CompanyType,
                            ViewBag.CompanyTypes as SelectList,
                            "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        行业</p>
                    @Html.DropDownListFor(
                            x => x.Industry,
                          ViewBag.Industrys as SelectList,
                           "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        任职部门</p>
                    @Html.TextBoxFor(x => x.Department, new { @class = "long_input" })
                    @Html.ValidationMessageFor(x => x.Department)
                </li>
                <li>
                    <p>
                        职位分类</p>
                    @{var index = 0;}
                    <select id="jobCategoryList1">
                        @foreach (var item in ViewBag.JobCategoryList)
                        {
                            if (index == 0)
                            {
                            <option value="">请选择:</option>    
                            }
                            index++;
                            <optgroup label="@item.Name">
                                <!--循环显示子类-->
                                @foreach (var subItem in (ViewBag.SubJobCategoryList as List<Lov>).Where(x => x.ParentId.Value.Equals(item.Id)))
                                {
                                    <option value="@subItem.Value">@subItem.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </li>
                <li>
                    <p>
                        职位名称</p>
                    @Html.TextBoxFor(x => x.JobTitle, new { @class = "long_input" })
                    @Html.ValidationMessageFor(x => x.JobTitle)
                </li>
                <li>
                    <p>
                        工作描述（可选）</p>
                    @Html.TextAreaFor(x => x.Description, new { @class = "long_textarea" })
                    @Html.ValidationMessageFor(x => x.Description)
                </li>
                <li>
                    <p>
                        时段</p>
                    年：
                    @Html.TextBoxFor(x => x.StartYear, new { @class = "short_input" })
                    月：
                    @Html.DropDownListFor(
                             x => x.StartMonth,
                           ViewBag.ListMonthStart as SelectList,
                           "月: ",
                            new { @class = "short_select" })
                    到
                    @Html.ValidationMessage("RequiredError")
                    @Html.ValidationMessage("StartDataError")
                    <br />
                    年：
                    @Html.TextBoxFor(x => x.EndYear, new { @class = "short_input" })
                    月：
                    @Html.DropDownListFor(
                            x => x.EndMonth,
                            ViewBag.ListMonthEnd as SelectList,
                            "月: ",
                            new { @class = "short_select" })
                    @Html.ValidationMessage("EndDataError")
                    <span>不填写表示您当前仍在此公司工作</span> </li>
                <li class="line">
                    @Html.CheckBoxFor(x => x.IsShielded)是否屏蔽该公司访问我的简历</li>
                <div class="workEdit_btns">
                    @Html.HiddenFor(x => x.Id)
                    @Html.HiddenFor(x => x.ResumeId)
                    @Html.HiddenFor(x => x.ReturnUrl)
                    @Html.HiddenFor(x => x.Category1)
                    <input type="image" id="btnSubmit" src="../../../Administration/Content/images/icons-save-64-19.png" />或
                    <a href="@Model.ReturnUrl">取消</a></div>
            </ul>
        </div>
    </div>
}